package com.example.mode;

import java.util.Arrays;
import java.util.List;
import java.util.Random;

/**
 * live_broadcast_of_pony com.zykj.liumaizhibo
 * 2019-12-31 16:31
 * 数据源，测试专用
 */
public class DataResourceUtil {
    private static DataResourceUtil sDataResourceUtil;

    private DataResourceUtil() {
    }

    public static DataResourceUtil getInstance() {
        if (null == sDataResourceUtil) sDataResourceUtil = new DataResourceUtil();
        return sDataResourceUtil;
    }

    public String getTitle() {
        String[] tian = {"甲", "乙", "丙", "丁", "戊", "己", "庚", "辛", "壬", "癸"};
        String[] di = {"子", "丑", "寅", "卯", "辰", "巳", "午", "未", "申", "酉", "戌", "亥"};
        int t_index = new Random().nextInt(tian.length);
        int d_index = new Random().nextInt(di.length);

        return tian[t_index] + di[d_index];
    }

    public String getItem() {
        String[] s1 = {"羽绒", "加绒羽绒", "轻薄羽绒", "牛仔", "毛衣", "西装", "雷斯", "羊绒", "毛呢", "针织"};
        String[] s2 = {"服", "大衣", "马甲", "外套", "连衣裙", "棉服"};
        int t_index = new Random().nextInt(s1.length);
        int d_index = new Random().nextInt(s2.length);

        return s1[t_index] + s2[d_index];
    }

    public String getImage() {
        String[] images = {"https://img.ivsky.com/img/tupian/pre/201907/06/xuejing-013.jpg"
                , "https://img.ivsky.com/img/tupian/pre/201907/06/xuejing-015.jpg"
                , "https://img.ivsky.com/img/tupian/pre/201907/06/xuejing-016.jpg"
                , "https://img.ivsky.com/img/tupian/pre/201907/06/xuejing-017.jpg"
                , "https://img.ivsky.com/img/tupian/pre/201906/09/jiuzhaigou-002.jpg"
                , "https://img.ivsky.com/img/tupian/pre/201906/09/jiuzhaigou-004.jpg"
                , "https://img.ivsky.com/img/tupian/pre/201801/29/wutaishan-002.jpg"
                , "https://img.ivsky.com/img/tupian/pre/201801/29/wutaishan-003.jpg"
                , "https://img.ivsky.com/img/tupian/pre/201801/11/mount_wutai-005.jpg"};
        int t_index = new Random().nextInt(images.length);
        return images[t_index];
    }

    public List<String> getImages() {
        String[] images = {"https://img.ivsky.com/img/tupian/pre/201907/06/xuejing-013.jpg"
                , "https://img.ivsky.com/img/tupian/pre/201907/06/xuejing-015.jpg"
                , "https://img.ivsky.com/img/tupian/pre/201907/06/xuejing-016.jpg"
                , "https://img.ivsky.com/img/tupian/pre/201907/06/xuejing-017.jpg"
                , "https://img.ivsky.com/img/tupian/pre/201906/09/jiuzhaigou-002.jpg"
                , "https://img.ivsky.com/img/tupian/pre/201906/09/jiuzhaigou-004.jpg"
                , "https://img.ivsky.com/img/tupian/pre/201801/29/wutaishan-002.jpg"
                , "https://img.ivsky.com/img/tupian/pre/201801/29/wutaishan-003.jpg"
                , "https://img.ivsky.com/img/tupian/pre/201801/11/mount_wutai-005.jpg"};
        return Arrays.asList(images);
    }
}
